package com.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.BuyInfoBean;
import com.project.bean.BuyOrderBean;

import java.time.LocalDate;

public interface IBuyInfoService {

    /**
     * 动态分页查询订单
     * @param pageNO    页码
     * @param supplierName  供应商名字
     * @param startDate 起始日期
     * @param endDate   结束日期
     * @return  分页对象
     */
    IPage<BuyOrderBean> findByItem (Integer pageNO, String supplierName, LocalDate startDate, LocalDate endDate);

    /**
     * 查看采购详情
     * 通过采购id查询订单信息，同时查询该订单的明细信息
     * @param buyOrderId    采购id
     * @return  采购订单对象
     */
    public BuyOrderBean findByOrderId(Integer buyOrderId);
}
